#ifndef _OPENCAS_SECTION_FILTER
#define _OPENCAS_SECTION_FILTER
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#define SECTION_FILTER_SIZE  16

typedef struct _pid_channel pid_channel_t;
typedef void (*channel_cb_t)(pid_channel_t*, uint8_t *section, uint32_t len, void *data);

pid_channel_t* pid_channel_alloc(short pid, channel_cb_t cb, void *data, int timeout);
int pid_channel_add_section_filter(pid_channel_t *channel, uint8_t *match, uint8_t *mask);
int pid_channel_start(pid_channel_t *channel);
int pid_channel_free(pid_channel_t *channel);

#ifdef __cplusplus
}
#endif

#endif
